package com.youhome.business.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel
public class DTOCompany extends DTOSMS {

    @NotBlank(message = "手机不能为空")
    @Pattern(
            regexp = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$",
            message = "手机号不正确"
    )
    @ApiModelProperty(value = "注册手机号", required = true)
    private String phone;

    @NotBlank(message = "公司名称不能为空")
    @ApiModelProperty(value = "公司名称", required = true)
    private String name;

    @NotBlank(message = "省/市不能为空")
    @ApiModelProperty(value = "省/市", required = true)
    private String province;

    @NotBlank(message = "市不能为空")
    @ApiModelProperty(value = "市", required = true)
    private String city;

    @NotBlank(message = "区不能为空")
    @ApiModelProperty(value = "区", required = true)
    private String area;

    @NotBlank(message = "地址不能为空")
    @ApiModelProperty(value = "地址", required = true)
    private String address;

    @ApiModelProperty(value = "LOGO")
    private String logo;

    @ApiModelProperty(value = "公众号")
    private String officialAccounts;

    @ApiModelProperty(value = "公众号二维码地址")
    private String officialAccountsQRCode;

    @ApiModelProperty(value = "公司服务号")
    private String serviceNumber;

    @ApiModelProperty(value = "公司网址")
    private String website;

    @ApiModelProperty(value = "公司规模")
    private String scale;

    @NotBlank(message = "负责人邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    @ApiModelProperty(value = "负责人邮箱", required = true)
    private String principalEmail;

    @NotBlank(message = "负责人姓名不能为空")
    @ApiModelProperty(value = "负责人姓名", required = true)
    private String principalName;

    @NotBlank(message = "负责人电话不能为空")
    @Pattern(
            regexp = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$",
            message = "手机号不正确"
    )
    @ApiModelProperty(value = "负责人电话", required = true)
    private String principalPhone;

    @ApiModelProperty(value = "证件类型，1普通营业执照，2多证合一营业执照", required = true)
    private Integer credentialType;

    @ApiModelProperty(value = "营业执照证件号")
    private String businessLicenseNumber;

    @ApiModelProperty(value = "组织机构代码")
    private String organizationCode;

    @ApiModelProperty(value = "统一社会信用代码")
    private String creditCode;

    @ApiModelProperty(value = "五证合一图片")
    private String photo;

    @ApiModelProperty(value = "公司邮箱")
    @Email(message = "邮箱格式不正确")
    private String companyEmail;

    @ApiModelProperty(value = "公司电话")
    private String companyTel;

}